package com.xhwy.mapper;

import com.xhwy.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Set;

@Mapper
@Repository
public interface OrderMapper {

    /**
     * 批量插入订单
     * @param orders
     * @return
     */
    int batchInsert(List<Order> orders);

    /**
     * 根据订单详情id集合获取订单数据
     * @param orderDetailIdCollection
     * @return
     */
    List<Order> getByOrderDetailIdCollection(Collection<String> orderDetailIdCollection);

    /**
     * 根据订单详情id获取订单信息
     * @param orderDetailId
     * @return
     */
    List<Order> getByOrderDetailId(String orderDetailId);
}
